﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once
#include "CrashHelper.h"

#ifdef _WINDOWS
    #define DBG_CRASH(EXPRESSION, CRASHTIPS) \
    if(!(EXPRESSION)) \
    { \
        gcmp::CrashHelper::GetInstance()->Crash(_CRT_WIDE(#EXPRESSION), _CRT_WIDE(__FILE__), __LINE__,  _CRT_WIDE(__FUNCTION__), CRASHTIPS); \
    }
#else
    #define DBG_CRASH(EXPRESSION, CRASHTIPS) \
    if(!(EXPRESSION)) \
    { \
        abort();\
    }
#endif
